package com.x.client.model;

import com.x.framework.annotation.MappingColumn;
import com.x.framework.annotation.MappingTable;
import com.x.framework.model.BaseObject;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

@MappingTable(tableName = "CLIENT_USER")
public class User extends BaseObject {


	@MappingColumn(columnName = "USER_ID", columnPk = true, columnLength = 32)
	private String userId;

	@NotNull(message = "用户手机号不能为空！")
	@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
	@MappingColumn(columnName = "USER_MOBILE")
	private String userMobile;

	@MappingColumn(columnName = "USER_NICKNAME")
	private String userNickname;

	@MappingColumn(columnName = "USER_HEAD")
	private String userHead;

	@MappingColumn(columnName = "USER_TOKEN")
	private String userToken;

	@MappingColumn(columnName = "USER_SOURCE")
	private String userSource;

	@MappingColumn(columnName = "WX_OPEN_ID")
	private String wxOpenId;

	@MappingColumn(columnName = "USER_CREATE_TIME")
	private Date userCreateTime;

	@MappingColumn(columnName = "USER_UPDATE_TIME")
	private Date userUpdateTime;

	public User() {
	}

	public User(String userMobile) {
		this.userMobile = userMobile;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserMobile() {
		return userMobile;
	}

	public void setUserMobile(String userMobile) {
		this.userMobile = userMobile;
	}

	public String getUserNickname() {
		return userNickname;
	}

	public void setUserNickname(String userNickname) {
		this.userNickname = userNickname;
	}

	public String getUserHead() {
		return userHead;
	}

	public void setUserHead(String userHead) {
		this.userHead = userHead;
	}

	public String getUserToken() {
		return userToken;
	}

	public void setUserToken(String userToken) {
		this.userToken = userToken;
	}

	public String getUserSource() {
		return userSource;
	}

	public void setUserSource(String userSource) {
		this.userSource = userSource;
	}

	public String getWxOpenId() {
		return wxOpenId;
	}

	public void setWxOpenId(String wxOpenId) {
		this.wxOpenId = wxOpenId;
	}

	public Date getUserCreateTime() {
		return userCreateTime;
	}

	public void setUserCreateTime(Date userCreateTime) {
		this.userCreateTime = userCreateTime;
	}

	public Date getUserUpdateTime() {
		return userUpdateTime;
	}

	public void setUserUpdateTime(Date userUpdateTime) {
		this.userUpdateTime = userUpdateTime;
	}
}
